#
# ttkiosk - table tennis club touch screen based kiosk.
# Copyright (C) 2009  Sergey Satskiy
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA  02110-1301, USA.
#
# $Id: TopBar.py 19 2009-10-04 17:34:05Z sergey.satskiy $
#
# Generated by PyQt4 UI code generator 4.5.4 and then customized
#


from PyQt4 import QtCore, QtGui
import ui

class Ui_TopBar(ui.FormBaseClass):
    def setupUi(self, TopBar):
        ui.FormBaseClass.__init__(self)

        TopBar.setObjectName("TopBar")
        TopBar.resize(521, 100)
        self.horizontalLayoutWidget = QtGui.QWidget(TopBar)
        self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 511, 80))
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.topLabel = QtGui.QLabel(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(20)
        font.setWeight(50)
        font.setBold(False)
        self.topLabel.setFont(font)
        self.topLabel.setAlignment(QtCore.Qt.AlignCenter)
        self.topLabel.setObjectName("topLabel")
        self.horizontalLayout.addWidget(self.topLabel)

        self.retranslateUi(TopBar)
        QtCore.QMetaObject.connectSlotsByName(TopBar)

    def retranslateUi(self, TopBar):
        TopBar.setWindowTitle(QtGui.QApplication.translate("TopBar", "Form", None, QtGui.QApplication.UnicodeUTF8))
        self.topLabel.setText(QtGui.QApplication.translate("TopBar", "Today\'s Event: none", None, QtGui.QApplication.UnicodeUTF8))


class TopBar(QtGui.QWidget, Ui_TopBar):
    def __init__(self, path, parent=None, f=QtCore.Qt.WindowFlags()):
        QtGui.QWidget.__init__(self, parent, f)

        self.setupUi(self)


    def setLayoutGeometry( self, width, height ):
        """ updates the whole form layout size """

        self.horizontalLayoutWidget.setGeometry( QtCore.QRect( 0, 0, width, height ) )
        return


